import { fliterPermission } from '@/utils/sys.js'
export const apis = {
  list: `admin/basis/getList?modelCode=MODEL_TRANSPORT_RULE&authCode=FUNCTION_TRANSPORT_RULE_LIST`,
  edit: `admin/transportRule/edit?authCode=BTN_TRANSPORT_RULE_EDIT`,
  detail: `admin/basis/detail?modelCode=MODEL_TRANSPORT_RULE&authCode=BTN_TRANSPORT_RULE_DETAIL`,
};

export const configs = {
  listUrl: apis.list,
  pageOn: true, // 开启分页
  searchOn: true, // 开启搜索
  operateOn: true, //开启操作区域
  treeOn: false, // 开启树形
};


export const searchs = [
  {
    type: "Input",
    column: "transport_rule_name",
    label: "规则名称",
  }
];

export const pages = {
  pageSize: 20,
  orders: [
    {
      field: "id",
      sort: "desc",
    },
  ]
};
export const columns = [
  { type: "selection" },
  {
    label: "ID",
    column: "id",
    sortable: "custom",
    
  },
  {
    label: "规则名称",
    column: "transport_rule_name",
    display: "text",
  },
  {
    label: "规则编码",
    column: "transport_rule_code",
    display: "text",
  },
  {
    label: "规则值",
    column: "transport_rule_value",
    display: "text",
  },
  {
    label: "规则描述",
    column: "transport_rule_desc",

  },
  {
    label: "创建时间",
    column: "ctime",
    format: "datetime",
    display: "text",
  },
  { label: "操作", column: "operate", width: "240", fixed: "right" },
];


export const columnButtons = fliterPermission([
 
  {
    operate: "edit",
    text: "编辑",
    permission: 'BTN_TRANSPORT_RULE_EDIT',
   
  }
]);
